<!DOCTYPE html>
<html>
<head>
    <meta charset=utf-8">
    <title></title>
    <style>
        .kong{
            height: 10px;
        }
    </style>
</head>
<body>
<form id="test" action="/release" method="post" enctype="multipart/form-data">
    <table class="form" cellpadding="0" cellspacing="0" border="1px solid" style="width: 100%;">
        <tr class="kong"></tr>
        <tr>
            <td align="right" style="width: 100px;">物品种类&nbsp;&nbsp;</td>
            <td colspan="3">
                <input type="checkbox" name="category" value="1">钱包
                <input type="checkbox" name="category" value="2">证件
                <input type="checkbox" name="category" value="3">卡类
                <input type="checkbox" name="category" value="4">印章
                <input type="checkbox" name="category" value="5">钥匙
                <input type="checkbox" name="category" value="6">衣物
                <input type="checkbox" name="category" value="7">手机
                <input type="checkbox" name="category" value="8">首饰<br>
                <input type="checkbox" name="category" value="9">票据
                <input type="checkbox" name="category" value="10">数码
                <input type="checkbox" name="category" value="11">车牌
                <input type="checkbox" name="category" value="12">电脑
                <input type="checkbox" name="category" value="13">包裹
                <input type="checkbox" name="category" value="14">车辆
                <input type="checkbox" name="category" value="15">宠物
                <input type="checkbox" name="category" value="16">其他<br>
            </td>
        </tr>
        <tr class="kong"></tr>
        <tr>
            <td align="right" style="height: 29px;">信息标题<span style="color: red;">*</span>&nbsp;</td>
            <td colspan="3"><input style="width: 400px;" rangelength="[4,23]" required id="title" name="title" onchange="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'');"></td>
        </tr>
        <tr class="kong"></tr>
        <tr>
            <td align="right">详细描述&nbsp;&nbsp;</td>
            <td colspan="3">
						  <textarea id="editor" name="editor" style="width:700px;height:300px;">
						  </textarea>
            </td>
        </tr>
        <tr class="kong"></tr>
        <tr>
            <td align="right">丢失地点&nbsp;&nbsp;</td>
            <td><input type="text" name="lostPlace"></td>
            <td align="right" style="width: 80px;">丢失时间<span style="color: red;">*</span>&nbsp;</td>
            <td>
                <input type="text" id="lostTime" name="lostTime" required value="" class="Wdate" readonly="readonly" style="cursor: pointer;width: 150px;" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',vel:'d244_2'})">
            </td>
        </tr>
        <tr class="kong"></tr>
        <tr>
            <td align="right">联系地址&nbsp;&nbsp;</td>
            <td colspan="3"><input id="address" name="address" style="width: 220px;"></td>
        </tr>
        <tr class="kong"></tr>
        <tr>
            <td align="right">联系人&nbsp;&nbsp;</td>
            <td>
                <input style="width: 170px;" id="contactPerson" name="contactPerson" value="">
            </td>
            <td align="right">手机&nbsp;&nbsp;</td>
            <td  style="width: 300px;height: 29px;">
                <input id="mobile" isPhone="true" name="mobile" style="width: 120px;" value="">
            </td>
        </tr>
        <tr class="kong"></tr>
        <tr>
            <td align="right">QQ&nbsp;&nbsp;</td>
            <td><input id="qq" name="qq" style="width: 120px;" value=""></td>
            <td align="right">验证码<span style="color: red;">*</span>&nbsp;</td>
            <td>
                <input type="text" size="5" name="random" maxlength="5">
                <img title="看不清?换一张" id="randomcodeimg" src="/randomcode" style="margin-left: 2px; cursor: pointer;"></td>
        </tr>
        <tr class="kong"></tr>
        <tr style="height: 29px;">
            <td align="right">酬谢方式&nbsp;&nbsp;</td>
            <td style="color: red;"><input type="checkbox" name="thanks" value="1">通过中国失物招领平台发布感谢</td>
            <td align="right">
                <input type="checkbox" name="promise" value="1">支付酬金&nbsp;&nbsp;
            </td>
            <td>
                <input type="number" name="dol" min="1" style="width: 150px;"/>
            </td>
        </tr>
        <tr style="height: 20px;"></tr>
        <tr>
            <td colspan="4" align="center">
                <input type="submit" value="朕 要 发 布" name="btn-release"/>
            </td>
        </tr>
    </table>
</form>

<script type="text/javascript" src="js/jquery-3.3.0.js" ></script>
<script src="js/jquery-validate/jquery.validate.min.js"></script>
<script src="js/jquery-validate/messages_zh.js"></script>
<script>
    jQuery.validator.addMethod("isP", function(value, element) {
        return !($("#promise").is(":checked") && value=="");
    }, "请输入酬金金额");
    jQuery.validator.addMethod("isPhone", function(value, element) {
        var length = value.length;
        var mobile = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;
        return length == 11 && mobile.test(value);
    }, "请填写正确的手机号码");//可以自定义默认提示信息
    $("#test").validate();
</script>
<script charset="utf-8" src="editor/kindeditor-all.js"></script>
<script charset="utf-8" src="editor/lang/zh-CN.js"></script>
<script>
    KindEditor.ready(function(K) {
        window.editor = K.create('#editor',{width:'700px',height:'300px'
            ,uploadJson : '/upload'
            ,allowFileUpload:false});
    });
</script>
</body>
</html>
